package com.hnjme.cnec.common.exception;


import com.hnjme.cnec.common.constant.JmeBizStatus;

import java.io.Serializable;

/**
 * 系统异常类
 *
 * @ClassName: JmeException
 * @Description:
 * @author: jiaqi
 * @date: 2016年6月13日 上午8:59:21
 */
public class JmeException extends RuntimeException implements Serializable {

    private static final long serialVersionUID = -2455970393377560143L;

    private JmeBizStatus status;

    public Integer getStatus() {
        return status.getCode();
    }

    public JmeException() {
        super();
    }

    public JmeException(JmeBizStatus status) {
        super(status.getMsg());
        this.status = status;
    }

    public JmeException(JmeBizStatus status, String msg) {
        super(msg);
        this.status = status;
    }

    public JmeException(JmeBizStatus status, Throwable e) {
        super(e);
        this.status = status;
    }

    public JmeException(JmeBizStatus status, String msg, Throwable e) {
        super(msg, e);
        this.status = status;
    }

    public Throwable getCause() {
        return super.getCause();
    }

    public String getMessage() {
        return super.getMessage();
    }

    public Throwable initCause(Throwable cause) {
        return super.initCause(cause);
    }


}
